<?php get_header(); ?>

<div class="indextop">

<div class="randomgames">
<?php if (have_posts()) : ?>

<div class="randomtop2">

		<h2 class="pagetitle">Search Results</h2>

</div>

<div class="randomgame">

<?php while (have_posts()) : the_post(); ?>
<div class="gamethumb">

<div class="thumbs">
<a href="<?php the_permalink() ?>" title="Play <?php the_title_attribute(); ?>"><img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="" height="80" width="96" /></a>
</div>
<div class="thumbtitle">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Play <?php the_title_attribute(); ?>"><?php
$tit = the_title('','',FALSE);
echo substr($tit, 0, 15);
if (strlen($tit) > 15) echo " ...";
?></a>
</div>
</div>
<?php endwhile; ?>

</div>

<div class="randombottom"></div>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?>
	<?php else : ?>

		<h2 class="center">No posts found. Try a different search?</h2>

	<?php endif; ?>
</div>

<?php include (TEMPLATEPATH . '/ads/ad-336-280.php'); ?>

</div>


<?php get_footer(); ?>
